/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package librairies;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import javax.swing.JTextPane;

/**
 *
 * @author FM & KB
 */
public class OutputStreamManager extends OutputStream {
    
    public static PrintStream output;
    private JTextPane txtPane;
    
    public OutputStreamManager(JTextPane txtPane){
        this.txtPane = txtPane;
    }

    @Override
    public void write(int i) throws IOException {
          txtPane.setText(txtPane.getText() + (char)i);
    }
    
    public JTextPane getTxtPane(){
        return txtPane;
    }
   
}
